import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/', // 登录页
    name: 'login',
    component: () => import('@/views/login')
  },
  {
    path: '/layout', // 首页
    component: () => import('@/views/layout'),
    children: [
      {
        path: '/', // 首页
        component: () => import('@/views/home')
      },
      {
        path: '/contract', // 发起合同
        name: 'contract',
        component: () => import('@/views/contract')
      },
      {
        path: '/my', // 我的
        name: 'my',
        component: () => import('@/views/my')
      }
    ]
  },
  {
    path: '/sign', // 收到合同
    name: 'sign',
    component: () => import('@/views/sign')
  },
  {
    path: '/sth', // 拖拽盖章
    name: 'sth',
    component: () => import('@/views/sth')
  },
  {
    path: '/sth-fixed', // 固定盖章
    name: 'sth-fixed',
    component: () => import('@/views/sth-fixed')
  },
  {
    path: '/canvas', // 画布
    name: 'canvas',
    component: () => import('@/views/canvas')
  },
  {
    path: '/authentication', // 合同完成
    name: 'authentication',
    component: () => import('@/views/authentication')
  },
  {
    path: '/past', // 合同过期
    name: 'past',
    component: () => import('@/views/past-due')
  },
  {
    path: '/register', // 注册账号
    name: 'register',
    component: () => import('@/views/register')
  },
  {
    path: '/autonym', // 选择实名认证
    name: 'autonym',
    component: () => import('@/views/autonym')
  },
  {
    path: '/real', // 实名认证类型
    name: 'real-name',
    component: () => import('@/views/real-name')
  },
  {
    path: '/ContractInformation', // 直接发起合同
    name: 'ContractInformation',
    component: () => import('@/views/contract/ContractInformation')
  },
  {
    path: '/useTemplateCreateContract', // 使用模板
    name: 'useTemplateCreateContract',
    component: () => import('@/views/contract/use-template-create-contract')
  },
  {
    path: '/send-a-duplicate', // 抄送方个人
    name: 'send-a-duplicate',
    component: () => import('@/views/send-a-duplicate')
  },
  {
    path: '/enterprises-signed', // 抄送方企业
    name: 'enterprises-signed',
    component: () => import('@/views/enterprises-signed')
  },
  {
    path: '/add-personal', // 添加个人
    name: 'add-personal',
    component: () => import('@/views/add-personal')
  },
  {
    path: '/add-enterprise', // 添加企业
    name: 'add-enterprise',
    component: () => import('@/views/add-enterprise')
  },
  {
    path: '/look-over', // 签署进程
    name: 'look-over',
    component: () => import('@/views/look-over')
  },
  {
    path: '/frequent-contacts/:id', // 联系人默认页面
    name: 'frequent-contacts',
    component: () => import('@/views/frequent-contacts')
  },
  {
    path: '/communicate', // 常用联系人
    name: 'communicate',
    component: () => import('@/views/communicate')
  },
  {
    path: '/station', // 印章管理
    name: 'station',
    component: () => import('@/views/station')
  },
  {
    path: '/reset', // 注册，修改密码成功
    name: 'reset',
    component: () => import('@/views/reset')
  },
  {
    path: '/approve', // 审批
    name: 'approve',
    component: () => import('@/views/approve')
  },
  {
    path: '/performance', // 签署完成
    name: 'performance',
    component: () => import('@/views/performance')
  },
  {
    path: '/sign-location', // 指定签署位置
    name: 'sign-location',
    component: () => import('@/views/sign-location')
  }
]

const router = new VueRouter({
  routes
})

export default router
